cmake_minimum_required(VERSION 3.5)
project(ch7)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -w  -O0 -march=native -g -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w   -O0 -march=native -g -std=c++11")

set(CMAKE_BUILD_TYPE "Release")

find_package(Eigen3 REQUIRED)
include_directories(
  ${EIGEN3_INCLUDE_DIR}
)

add_library(${PROJECT_NAME} SHARED
  read_data.cpp
	optimizer.cpp
	wheel_preintegration.cpp
	imu_preintegration.cpp
	pose_observe.cpp
	imu_factor.cpp
	wheel_factor.cpp
	so2.cpp
	se2.cpp
)

add_executable(main_ch7 main_ch7.cpp)
target_link_libraries(main_ch7 ${PROJECT_NAME})

